package cn.com.homeyoda.aimate.aihealth.ui.health.adapter;

import android.content.Context;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wzq.mvvmsmart.utils.GlideLoadUtils;

import java.util.ArrayList;
import java.util.List;

import cn.com.homeyoda.aimate.aihealth.R;
import cn.com.homeyoda.aimate.aihealth.bean.SportPlanBean;

public class SportPlanAdapter extends BaseQuickAdapter<SportPlanBean.RowsBean, BaseViewHolder> {


    public SportPlanAdapter(int layoutResId, @Nullable List<SportPlanBean.RowsBean> data, Context context) {
        super(layoutResId, data);
        mContext = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, SportPlanBean.RowsBean item) {
        GlideLoadUtils.loadImg(helper.getView(R.id.iv_background), item.getIcon(), R.mipmap.bg_sport_def);
        helper.setText(R.id.plan_name, item.getName());
        helper.setText(R.id.plan_intro, item.getIntro());
    }

}
